<?php if (isset($_SESSION["msg_sucesso"])) { ?>
    <script>
        $(function() {
            $('#modal').modal('show');
        });
    </script>
    <div id="modal" class="modal fade" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="text-center" style="color: #398439"><b><?php echo $_SESSION['msg_sucesso']; ?></b></div>
                </div>
                <div id="modal_footer" class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">OK</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <?php
    unset($_SESSION["msg_sucesso"]);
}
if (isset($_SESSION["msg_erro"])) {
    ?>
    <script>
        $(function() {
            $('#modal').modal('show');
        });
    </script>
    <div id="modal" class="modal fade" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="text-center" style="color: #FF0000"><b><?php echo $_SESSION["msg_erro"]; ?></b></div>
                </div>
                <div id="modal_footer" class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">OK</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <?php
    unset($_SESSION["msg_erro"]);
}
if (isset($_SESSION["msg_info"])) {
    ?>
    <script>
        $(function() {
            $('#modal').modal('show');
        });
    </script>
    <div  id="modal" class="modal fade" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="text-center" style="color: #285e8e"><b><?php echo $_SESSION['msg_info']; ?></b></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">OK</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <?php
    unset($_SESSION["msg_info"]);
}
?>
